package com.avic.dal.mapper;

import com.avic.dal.condition.EmergencyResourceListCondition;
import com.avic.dal.model.EmergencyResource;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author: huangsheng
 * @date: 2018/9/3
 */
@Mapper
public interface EmergencyResourceMapper {

    /**
     * 分页获取数据
     *
     * @param emergencyResourceListCondition
     * @return
     */
    List<EmergencyResource> itemList(EmergencyResourceListCondition emergencyResourceListCondition);

    /**
     * 数据总数
     *
     * @param emergencyResourceListCondition
     * @return
     */
    int queryRecordsTotal(EmergencyResourceListCondition emergencyResourceListCondition);

    /**
     * 新增资源
     *
     * @param emergencyResource
     * @return
     */
    int insert(EmergencyResource emergencyResource);

    /**
     * 通过资源编号查询数据量
     *
     * @param resourceNumber
     * @return
     */
    int queryItemCountByNumber(String resourceNumber);

    /**
     * 更新数据
     *
     * @param emergencyResource
     * @return
     */
    int update(EmergencyResource emergencyResource);

    /**
     * 删除资源
     *
     * @param id
     * @return
     */
    int delete(String id);

    /**
     * 通过ID查询数据
     *
     * @param id
     * @return
     */
    EmergencyResource queryItemById(String id);
}
